xen/arm: p2m: Re-implement p2m_cache_flush using p2m_get_entry
authorJulien Grall <julien.grall@arm.com>
Thu, 15 Sep 2016 11:28:30 +0000 (12:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 28 Sep 2016 01:14:04 +0000 (18:14 -0700)
commit15d77a68818ccda02a24209a092a63cc1c1ec9dc
treeca86525effdcf5541b43df5194d153c65e94b37a
parenta7faacc0f1d6d71e4072800b0c89c6a6572a5b4d
xen/arm: p2m: Re-implement p2m_cache_flush using p2m_get_entry

The function p2m_cache_flush can be re-implemented using the generic
function p2m_get_entry by iterating over the range and using the mapping
order given by the callee.

As the current implementation, no preemption is implemented, although
the comment in the current code claimed it. As the function is called by
a DOMCTL with a region of 1GB maximum, I think the preemption can be
left unimplemented for now.

Finally drop the operation CACHEFLUSH in apply_one_level as nobody is
using it anymore. Note that the function could have been dropped in one
go at the end, however I find easier to drop the operations one by one
avoiding a big deletion in the patch that convert the last operation.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Tamas K Lengyel <tamas@tklengyel.com>
xen/arch/arm/p2m.c